package cn.woniu.ecommerceplatform.entity;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 登录时将type和jwt返回的实体类,
 */
public class NewUser extends User {

    private Integer type;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public NewUser(String username, String password, Collection<? extends GrantedAuthority> authorities, Integer type) {
        super(username, password, authorities);
        this.type = type;
    }

}
